package com.eqdd.yiqidian.ui.gongneng.renshi.yuangongdangan.yuangongzhuangkuang;

import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.support.v7.widget.RecyclerView;

import com.eqdd.yiqidian.R;
import com.eqdd.yiqidian.RecyclerViewCustom;
import com.eqdd.yiqidian.base.Config;
import com.eqdd.yiqidian.bean.rebuild.slimedit.SlimEditEnterBean;
import com.eqdd.yiqidian.test.SelectExpandActivity;
import com.eqdd.yiqidian.ui.base.SlimBaseMultiEditActivity;

/**
 * Created by lv on 17-10-6.
 */

public class StaffFilterActivity extends SlimBaseMultiEditActivity {

    private RecyclerViewCustom dataBinding;

    @Override
    protected RecyclerView initRecyclerView() {
        return dataBinding.recyclerView;
    }

    @Override
    public void itemClick(int p) {

        switch (slimAdapterEx.getDataItem(p).getPosition()) {
            case 0:
                startActivityForResult(SelectExpandActivity.class, null, Config.SELECT_EXPAND);
                break;
        }
    }

    @Override
    protected void setEditBeans() {

        datas.add(new SlimEditEnterBean("部门筛选", "", 0, true, "请选择"));
    }

    @Override
    public void initBinding() {
        dataBinding = DataBindingUtil.setContentView(this, R.layout.activity_recyclerview);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == Config.SELECT_EXPAND && resultCode == Config.SUCCESS) {
            setResult(Config.SUCCESS, data);
            finish();
        }
    }
}
